package duyd.transaction.training.repository;

import java.util.Date;
import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import duyd.transaction.training.domain.Contact;

public interface ContactRepository extends CrudRepository<Contact, Long> {

    @Query("select count(c) from Contact c")
    public long countAll();
    
    public List<Contact> findByFirstNameAndLastName(String firstName, String lastName);
    
    public List<Contact> findByBirthDate(Date birthDate);
}
